<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>inputEx - How to use the YUI loader</title>

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

<!-- YUI loader-->	
<script src="../lib/yui/yuiloader/yuiloader-debug.js"></script> 

<!-- inputEx loader -->
<script src="../js/inputex-loader.js"></script>

</head>
<body class="yui-skin-sam">
	
	
	<h1>inputEx - Using the YUI loader</h1>
	
	<!-- Example 1 -->
	<div class='exampleDiv'>

		<h2>How to use the YUI loader</h2>

		<p>InputEx modules and dependencies are defined in the inputex-loader.js file. See <a  href="http://developer.yahoo.com/yui/yuiloader/">the YUI loader page</a> for more informations.</p>

		<div class='demoContainer' id='container1'>
		</div>

		<div class='codeContainer'>
			<textarea name="code" class="JScript">

				var loader = new YAHOO.util.YUILoader({
				    loadOptional: true,
					//base: "../lib/yui/", // remove the comment if you want to load YUI locally

					require: ["inputex-datetimefield"],

				    onSuccess: function() {
						new inputEx.DateTimeField( { 
							parentEl: 'container1',
							name: "date",
							value: new Date()
						});
					}
				});

				/**
				 * Important: this functions declares all inputEx Modules to YUI
				 */
				YAHOO.addInputExModules(loader, '../');
				loader.insert();

			</textarea>
		</div>

	</div>

	
	
	<div  class='exampleDiv'></div>
	
<script>

var loader = new YAHOO.util.YUILoader({
    loadOptional: true,
	//base: "../lib/yui/", // remove the comment if you want to load YUI locally
	
	require: ["inputex-datetimefield"],
	
    onSuccess: function() {
		new inputEx.DateTimeField( { 
			parentEl: 'container1',
			name: "date",
			value: new Date()
		});
	}
});

/**
 * Important: this functions declares all inputEx Modules to YUI
 */
YAHOO.addInputExModules(loader, '../');
loader.insert();

</script>


<script src="js/dpSyntaxHighlighter.js"></script>
<script language="javascript"> 
dp.SyntaxHighlighter.HighlightAll('code');
</script>


</body>
</html>